package com.zsxb.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.Page;
import com.zsxb.crm.annotation.AutoFill;
import com.zsxb.crm.annotation.Log;
import com.zsxb.crm.dto.ContractDTO;
import com.zsxb.crm.dto.ContractPageDTO;
import com.zsxb.crm.enumeration.OperationType;
import com.zsxb.crm.pojo.Contract;
import com.zsxb.crm.vo.ContractVO;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface ContractMapper extends BaseMapper<Contract> {

    Page<Contract> list(ContractDTO dto);
    //修改合同

    @AutoFill(OperationType.UPDATE)
    void update(ContractDTO dto);
    //根据id查询合同
    Contract getById(Long id);


    @AutoFill(OperationType.INSERT)
    void addContract(Contract contract);

    Page<Contract> report(ContractPageDTO pageDTO);

    ContractVO getById2(Long id);
}
